<template>
  <el-card class="author-card" shadow="never">
    <div class="author-info">
      <el-avatar :size="80" src="https://ext.same-assets.com/412138514/164083749.jpeg" class="author-avatar" />
      <h2 class="author-name">大小哈</h2>
      <p class="author-title">一枚程序员</p>
    </div>

    <div class="author-stats">
      <div class="stat-item">
        <div class="stat-num">7</div>
        <div class="stat-label">文章</div>
      </div>
      <div class="stat-item">
        <div class="stat-num">8</div>
        <div class="stat-label">分类</div>
      </div>
      <div class="stat-item">
        <div class="stat-num">15</div>
        <div class="stat-label">标签</div>
      </div>
      <div class="stat-item">
        <div class="stat-num">146908</div>
        <div class="stat-label">总访问量</div>
      </div>
    </div>

    <div class="author-social">
      <a href="#" class="social-link">
        <el-avatar shape="circle" :size="36" class="github-icon">
          <span class="fab fa-github" />
        </el-avatar>
      </a>
      <a href="#" class="social-link">
        <el-avatar shape="circle" :size="36" class="gitee-icon">
          <span class="fab fa-git-alt" />
        </el-avatar>
      </a>
      <a href="#" class="social-link">
        <el-avatar shape="circle" :size="36" class="zhihu-icon">知</el-avatar>
      </a>
      <a href="#" class="social-link">
        <el-avatar shape="circle" :size="36" class="csdn-icon">C</el-avatar>
      </a>
    </div>
  </el-card>
</template>

<script setup lang="ts">
// 没有需要导入的内容
</script>

<style scoped>
.author-card {
  margin-bottom: 24px;
  border-radius: 2px;
  background-color: #fff;
  border: 1px solid #f0f0f0;
}

.author-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}

.author-avatar {
  margin-bottom: 16px;
  border: 2px solid rgba(0, 0, 0, 0.06);
  transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.author-avatar:hover {
  transform: scale(1.1);
}

.author-name {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
}

.author-title {
  margin: 0;
  color: rgba(0, 0, 0, 0.45);
  font-size: 14px;
}

.author-stats {
  display: flex;
  justify-content: space-between;
  margin: 24px 0;
  padding: 16px 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-num {
  font-size: 16px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.85);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.45);
}

.author-social {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
}

.social-link {
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.social-link:hover {
  transform: translateY(-2px);
}

.github-icon {
  background-color: #24292e;
}

.gitee-icon {
  background-color: #c71d23;
}

.zhihu-icon {
  background-color: #0084ff;
  font-weight: 500;
}

.csdn-icon {
  background-color: #fc5531;
  font-weight: 500;
}

:deep(.el-card__body) {
  padding: 0 24px;
}
</style>
